package cn.bluethink.eguan.okrtask.entity;

import java.io.Serializable;
import java.util.Date;

import cn.bluethink.eguan.model.core.EgUser;
import cn.bluethink.eguan.model.okrtask.EgTaskKR;

public class TaskKREntity implements Serializable {
	private static final long serialVersionUID = 5118326887866467024L;

	private Long krid;
	
	/**
	 * 任务Id
	 */
	private Long tid;
	
	/**
	 * 关键项内容
	 */
	private String content;
	
	/**
	 * 被指派人Id
	 */
	private Long douid;
	
	private String douname;
	
	/**
	 * 关键项截止日期
	 */
	private Date etime;
	
	/**
	 * 关键项完成日期
	 */
	private Date ftime;
	
	/**
	 * 关键项备注
	 */
	private String remark;
	
	/**
	 * 对关键项完成情况的评价
	 */
	private String evaluate;
	
	/**
	 * 对关键项完成情况打分，百分制
	 */
	private Integer score;
	
	/**
	 * 关键项状态
	 */
	private Integer status;
	
	/**
	 * 关键项排序
	 */
	private Integer sort;

	/**
	 * 实体转模型
	 * @return
	 */
	public EgTaskKR createKeyResult() {
		EgTaskKR taskkr = new EgTaskKR();
		taskkr.setId(krid);
		taskkr.setTid(tid);
		taskkr.setKrContent(content);
		taskkr.setRemark(remark);;
		taskkr.setEtime(etime);
		taskkr.setEvaluate(evaluate);
		taskkr.setScore(score);
		taskkr.setStatus(status);
		taskkr.setFtime(ftime);
		if(douid == null || douid == 0) douid = 0L;
		taskkr.setDouser(new EgUser(douid, douname, null));
		return taskkr;
	}
	
	public Long getKrid() {
		return krid;
	}

	public void setKrid(Long krid) {
		this.krid = krid;
	}

	public Long getTid() {
		return tid;
	}

	public void setTid(Long tid) {
		this.tid = tid;
	}

	public String getContent() {
		return content;
	}

	public void setContent(String content) {
		this.content = content;
	}

	public Long getDouid() {
		return douid;
	}

	public void setDouid(Long douid) {
		this.douid = douid;
	}

	public String getDouname() {
		return douname;
	}

	public void setDouname(String douname) {
		this.douname = douname;
	}

	public Date getEtime() {
		return etime;
	}

	public void setEtime(Date etime) {
		this.etime = etime;
	}

	public Date getFtime() {
		return ftime;
	}

	public void setFtime(Date ftime) {
		this.ftime = ftime;
	}

	public String getRemark() {
		return remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}

	public String getEvaluate() {
		return evaluate;
	}

	public void setEvaluate(String evaluate) {
		this.evaluate = evaluate;
	}

	public Integer getScore() {
		return score;
	}

	public void setScore(Integer score) {
		this.score = score;
	}

	public Integer getStatus() {
		return status;
	}

	public void setStatus(Integer status) {
		this.status = status;
	}

	public Integer getSort() {
		return sort;
	}

	public void setSort(Integer sort) {
		this.sort = sort;
	}
	
}
